package object;

public class Demo01 {
    public static void main(String[] args) {
        Person p = new Person();
        p.setName("小明");
        p.setAge(30);

        String result = p.getInfo();
        System.out.println(result);

        System.out.println("============================");

        Phone phone = new Phone();
        phone.setName("苹果12");
        phone.setPrice(30);
        phone.setColor("红色");
        phone.setBrand("苹果");
        String result2 = phone.getInfo();
        System.out.println(result2);

        System.out.println("============================");
        Citizen citizen = new Citizen();
        MyDate myDate = new MyDate(1999, 10, 10);

        citizen.name = "张三";
        citizen.idCard = "9999";
        citizen.birthday = myDate;
        int year = myDate.year;
        int month = myDate.month;
        int day = myDate.day;
        System.out.println(citizen.name + " " + year + "-" + month + "-" + day + " " + citizen.idCard);
    }
}
